<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li  class="active"><a href="{:url('article/index')}">文章管理</a></li>
        <li><a href="{:url('article/add')}">添加文章</a></li>
    </ul>



    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th width="50">ID</th>
            <th>发布人</th>
            <th>标题</th>
            <th>分类</th>
            <th>描述</th>
            <th>封面</th>
            <th>浏览数</th>
            <th>评论数</th>
            <th>优先级</th>
            <th>添加时间</th>
            <th>更新时间</th>
            <th>状态</th>
            <th width="170">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr>
            <td>{$v.id}</td>
            <td>{$v.hasOneAdmin.user_name}</td>
            <td>{$v.title}</td>
            <td>{$v.hasOneCateGory.name}</td>
            <td>{$v.description}</td>
            <td>{$v.cover_id}</td>
            <td>{$v.view}</td>
            <td>{$v.comment}</td>
            <td>{$v.level}</td>
            <td>{$v.create_time}</td>
            <td>{$v.update_time}</td>
            <td>{eq name="v.status" value="1"}显示{/eq}
                {eq name="v.status" value="0"}隐藏{/eq}
            </td>
            <td>
                <a href="<?php echo url('article/edit',['id' => $v['id']])?>">编辑</a> |
                <a class="a-post" post-msg="你确定要删除吗" post-url="<?php echo url('article/delete',['id' => $v['id']])?>">删除</a> |
                {if condition="$v['status'] == 1"}
                <a  class="a-post" post-msg="你确定要禁用吗？" post-url="<?php echo url('article/status',['id' => $v['id'],'param'=>0])?>" >关闭</a>
                {else /}
                <a class="a-post" post-msg="你确定要启用吗？" post-url="<?php echo url('article/status',['id' => $v['id'],'param'=>1])?>" >开启</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="text-center">
        {$page}
    </div>
</div>
